<script>
	import Vue from 'vue'
	export default {
		globalData:{
			edition: 3
		},
		onLaunch: function() {
			uni.onTabBarMidButtonTap(function(e) {
					uni.navigateTo({
						url: "/pages/add/add",
						animationType: "slide-in-bottom", // 动画类型
						animationDuration: 150, // 窗口动画持续时间，单位为 ms
						fail(err) {
							console.log(err)
						}
					})
				}),
				uni.getSystemInfo({
					success: function(e) {
						// #ifndef MP
						Vue.prototype.StatusBar = e.statusBarHeight;
						if (e.platform == 'android') {
							Vue.prototype.CustomBar = e.statusBarHeight + 50;
						} else {
							Vue.prototype.CustomBar = e.statusBarHeight + 45;
						};
						// #endif

						// #ifdef MP-WEIXIN
						Vue.prototype.StatusBar = e.statusBarHeight;
						let custom = wx.getMenuButtonBoundingClientRect();
						Vue.prototype.Custom = custom;
						Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
						// #endif		

						// #ifdef MP-ALIPAY
						Vue.prototype.StatusBar = e.statusBarHeight;
						Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
						// #endif
					}
				})
			//初始化完成时，自动登录检测
			// this.$store.dispatch('autoLogin')
		},
		onShow: function() {

		},
		onHide: function() {},
	}
</script>

<style lang="scss">
	@import url("/components/iconfont/iconfont.css");
	@import url("/common/common.scss");
	
	@import "uview-ui/index.scss";
	// @import "./common/iconfont.css";
	// 引入全局css样式
	@import "colorui/main.css";
	@import "colorui/icon.css";

	.uni-tabbar__label {
		font-weight: bold;
	}
	
	.buttonshadow{
		 box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
	}
	body {
		background-color: #ffffff;
	}

	view,
	text {
		font-weight: bold;
	}

	// uni-tabbar {
	//     .uni-tabbar { // tab 背景
	// 	width: 100px;

	//     }
	//     .uni-tabbar~.uni-placeholder {
	//         height: 80rpx;
	//     }
	// }
	
</style>
